import type { App } from "vue";
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Index from "../pages/Index/index.vue";
import createJq from "../pages/CreateJq/creatJq.vue";
import { createGuard } from "./guard";
import jq_listVue from "@/pages/JqList/jq_list.vue";

const routes: RouteRecordRaw[] = [
  { path: "/", component: Index },
  { path: "/create_jq", component: createJq },
  { path: "/jq_list", component: jq_listVue },
];



const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export function setupRouter(app: App<Element>) {
  app.use(router);
  createGuard(router);
}

export default router;
